|
deleteRemoveHandler
|
deleteRemoveHandler ( self, handler )
Delete trigger handler for removing models
|
|
list
|
list (
self,
id=OpenModels.Default,
subid=OpenModels.Default,
modelTypes=[],
hidden=False,
all=False,
)
List models from the list of open models.
list(id = None, hidden=False, all=False, modelTypes=[]) => [models]
id is a model identifier (an integer). If hidden is true,
then the hidden models are returned. If all is true, then
both hidden and non-hidden models are returned. modelTypes
is a list of model types (see the global list modelTypes)
that restricts the types of the models returned.
|
|
addAddHandler
|
addAddHandler (
self,
func,
data,
)
Add trigger handler for adding models
|
|
registerPostGraphicsFunc
|
registerPostGraphicsFunc ( func )
Register a function to execute when the graphics state is ready
|
|
close
|
close (
self,
models,
checkForChanges=True,
)
Close models and remove from list of open models.
close(models) => None
|
|
makeLongBondsDashed
|
makeLongBondsDashed ( models )
Hide long bonds and replace with dashed pseudobonds
|
|
open
|
open (
self,
filename,
type=None,
baseId=OpenModels.Default,
subid=OpenModels.Default,
sameAs=None,
shareXform=True,
hidden=False,
defaultType=None,
prefixableType=False,
skipViewAll=False,
checkForChanges=True,
*args,
*kw,
)
Read in a file and add the models within.
open(filename, type=None, [add arguments,] args, *kw) -> [model(s)]
If the type is given, then then open handler for that type is
used. Otherwise the filename suffix is examined to determine
which open function to call. See the add documentation above.
Exceptions
|
|
ValueError, "unknown default type"
UserError( "Compressed %s files are not handled automatically.\n" "You need to decompress such files manually before using them." % type )
ValueError, "Unknown model type"
|
|
|
findfile
|
findfile ( filename, category="" )
|
|
isModel
|
isModel ( obj )
Return if obj is a model.
|
|
testDrawMode
|
testDrawMode (
e,
op,
value,
)
add draw mode testing capability to OSL
|
|
categorizeSurface
|
categorizeSurface ( *args )
|
|
makePseudoBondsToMetals
|
makePseudoBondsToMetals ( models )
Replace normal bonds with pseudobonds for coordinated metals.
makePseudoBondsToMetals(models) => numAtoms, deletedBonds
|
|
testElement
|
testElement (
e,
op,
value,
)
add element testing capability to OSL
Exceptions
|
|
SyntaxError, 'comma not allowed in element name'
|
|
|
add
|
add (
self,
models,
baseId=OpenModels.Default,
subid=OpenModels.Default,
sameAs=None,
shareXform=True,
hidden=False,
skipViewAll=False,
checkForChanges=False,
)
Add models to the list of open models.
add(models, sameAs=None, hidden=False) => None
baseId is the base model id to start numbering models with.
sameAs is an existing model that all of the new models should
share the same id and subid.
If shareXform is true, then initialize the model's transformation
matrix to be the same as the lowest positively numbered model
(if not baseId specified) or the lowest numbered model with the
same baseId. (Using sameAs overrides shareXform).
If hidden is true, that means that the given models do not
normally appear when listed.
|
|
registerOSLTests
|
registerOSLTests ()
|
|
deleteAddHandler
|
deleteAddHandler ( self, handler )
Delete trigger handler for adding models
|
|
makePythonAtomsBondsResidues
|
makePythonAtomsBondsResidues ( models )
Create Python objects for atoms, bonds, residues and coordsets.
makePythonAtomsBondsResidues(models) => None
|
|
testColor
|
testColor (
c,
op,
s,
)
import oslParser
add color testing capability to OSL
Exceptions
|
|
SyntaxError, 'comma not allowed in color name'
|
|
|
addOpenFinishedHandler
|
addOpenFinishedHandler (
self,
func,
data,
)
Add trigger handler for when a model is
finished opening
|
|
addRemoveHandler
|
addRemoveHandler (
self,
func,
data,
)
Add trigger handler for removing models
|
|
addModelClosedCallback
|
addModelClosedCallback ( model, callback )
Invoke a callback when a specified model is closed.
The callback is only called when the given model is closed.
The callback is automattically removed after it is called.
The callback is passed one argument, the closed model.
|
|
runCommand
|
runCommand ( *args, *kw )
convenience for programming...
|
|
closeAllModels
|
closeAllModels (
self,
trigger=None,
closure=None,
triggerData=None,
)
close non-hidden models first, so that "internal chain"
pseudobond groups can get removed by callbacks from
the C++ layer. Then close all remaining models. also, delay closure to the end of APPQUIT triggers, so that
other modules have opportunity to de-register from model-
closing triggers via APPQUIT
|
|
selectionOperation
|
selectionOperation ( sel )
|
|
checkKsdssp
|
checkKsdssp (
trigName,
myData,
models,
)
|
|
countAtomsAndResidues
|
countAtomsAndResidues ( models )
Count the total number of atoms and residues in the given models.
countAtomsAndResidues(models) => numAtoms, numResidues
|
|
closeSession
|
closeSession ()
|
|
remove
|
remove ( self, models )
Remove models from the list of open models.
remove(models) => None
|
|
systemPDBdir
|
systemPDBdir ()
|
|
initializeGraphics
|
initializeGraphics ()
|
|
oslLevel
|
oslLevel ( obj )
Return OSL level of object or None.
The OSL level is one of SelGraph, SelSubgraph, SelVertex, SelEdge.
|
|
delOpenFinishedHandler
|
delOpenFinishedHandler ( self, handler )
Delete trigger handler when model is finished opening
|
|